gtk/gtkuimanager.c: use accessor functions to access GtkWidget
authorJavier Jardón <jjardon@gnome.org>
Wed, 11 Aug 2010 20:06:02 +0000 (22:06 +0200)
committerJavier Jardón <jjardon@gnome.org>
Sun, 22 Aug 2010 19:25:22 +0000 (21:25 +0200)
gtk/gtkuimanager.c

index 0fb76e3d0e2c67bdd8372b140b0c0c011f3409fc..04c9517f5a773ae285b5b6cb2a78d807f1f7486f 100644 (file)
@@ -2395,7 +2395,7 @@ update_node (GtkUIManager *self,
              }
 
             gtk_activatable_set_related_action (GTK_ACTIVATABLE (info->proxy), NULL);
-           gtk_container_remove (GTK_CONTAINER (info->proxy->parent),
+           gtk_container_remove (GTK_CONTAINER (gtk_widget_get_parent (info->proxy)),
                                  info->proxy);
            g_object_unref (info->proxy);
            info->proxy = NULL;
@@ -2506,14 +2506,14 @@ update_node (GtkUIManager *self,
        {
          if (info->proxy)
            {
-             gtk_container_remove (GTK_CONTAINER (info->proxy->parent),
+             gtk_container_remove (GTK_CONTAINER (gtk_widget_get_parent (info->proxy)),
                                    info->proxy);
              g_object_unref (info->proxy);
              info->proxy = NULL;
            }
          if (info->extra)
            {
-             gtk_container_remove (GTK_CONTAINER (info->extra->parent),
+             gtk_container_remove (GTK_CONTAINER (gtk_widget_get_parent (info->extra)),
                                    info->extra);
              g_object_unref (info->extra);
              info->extra = NULL;
@@ -2553,14 +2553,14 @@ update_node (GtkUIManager *self,
        {
          if (info->proxy)
            {
-             gtk_container_remove (GTK_CONTAINER (info->proxy->parent),
+             gtk_container_remove (GTK_CONTAINER (gtk_widget_get_parent (info->proxy)),
                                    info->proxy);
              g_object_unref (info->proxy);
              info->proxy = NULL;
            }
          if (info->extra)
            {
-             gtk_container_remove (GTK_CONTAINER (info->extra->parent),
+             gtk_container_remove (GTK_CONTAINER (gtk_widget_get_parent (info->extra)),
                                    info->extra);
              g_object_unref (info->extra);
              info->extra = NULL;
@@ -2603,7 +2603,7 @@ update_node (GtkUIManager *self,
                                                G_CALLBACK (update_smart_separators),
                                                NULL);  
           gtk_activatable_set_related_action (GTK_ACTIVATABLE (info->proxy), NULL);
-         gtk_container_remove (GTK_CONTAINER (info->proxy->parent),
+         gtk_container_remove (GTK_CONTAINER (gtk_widget_get_parent (info->proxy)),
                                info->proxy);
          g_object_unref (info->proxy);
          info->proxy = NULL;
@@ -2661,7 +2661,7 @@ update_node (GtkUIManager *self,
                                                G_CALLBACK (update_smart_separators),
                                                NULL);
           gtk_activatable_set_related_action (GTK_ACTIVATABLE (info->proxy), NULL);
-         gtk_container_remove (GTK_CONTAINER (info->proxy->parent),
+         gtk_container_remove (GTK_CONTAINER (gtk_widget_get_parent (info->proxy)),
                                info->proxy);
          g_object_unref (info->proxy);
          info->proxy = NULL;
@@ -2707,7 +2707,7 @@ update_node (GtkUIManager *self,
 
          if (GTK_IS_SEPARATOR_TOOL_ITEM (info->proxy))
            {
-             gtk_container_remove (GTK_CONTAINER (info->proxy->parent),
+             gtk_container_remove (GTK_CONTAINER (gtk_widget_get_parent (info->proxy)),
                                    info->proxy);
              g_object_unref (info->proxy);
              info->proxy = NULL;
@@ -2742,7 +2742,7 @@ update_node (GtkUIManager *self,
          
          if (GTK_IS_SEPARATOR_MENU_ITEM (info->proxy))
            {
-             gtk_container_remove (GTK_CONTAINER (info->proxy->parent),
+             gtk_container_remove (GTK_CONTAINER (gtk_widget_get_parent (info->proxy)),
                                    info->proxy);
              g_object_unref (info->proxy);
              info->proxy = NULL;